package chapter4.subclass;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author lzy
 * @create 2018-03-16 上午11:47
 */
public class App {
    private final static Logger LOGGER = LoggerFactory.getLogger(App.class);

    public static void main(String[] args) {
        B b = new B();
        b.print();
        b.fun();

        Object c = new C();

        LOGGER.info("C is instance of A:{}", (c instanceof A));
        LOGGER.info("C is instance of B:{}", (c instanceof B));
        LOGGER.info("C is instance of C:{}", (c instanceof C));
        LOGGER.info("C is instance of D:{}", (c instanceof D));

        X x = new E();
        x.fun();
    }
}
